<?php
  // Display all header alerts via messageStack:
  if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
  }
  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
  echo htmlspecialchars(urldecode($_GET['error_message']));
  }
  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
   echo htmlspecialchars($_GET['info_message']);
} else {

}
?>
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<div id="headerWrapper">
	<div id="headerWrapper-top">
		<div id="headerWrapper-top-wrapper">
			<div id="header-info">
				<span><?php echo '<a href="'.zen_href_link(FILENAME_DEFAULT).'" style="color:#e8d8b4">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></span>
				<span>|</span>
				<span><a href="<?php echo zen_href_link(FILENAME_ABOUT_US)?>" rel="nofollow"><?php echo HEADER_TITLE_ABOUT_US?></a></span>
				<span>|</span>
				<span><a href="<?php echo zen_href_link(FILENAME_CONTACT_US)?>" rel="nofollow"><?php echo HEADER_TITLE_CONTACT_US?></a></span>
				<span>|</span>
				<span><a href="#" ><?php echo HEADER_TITLE_BLOG?></a></span>
			</div>
			<div id="header-login-register">
			<?php if ($_SESSION['customer_id']!=''){?>
			Welcome <?php echo $_SESSION['customer_last_name'];?>!&nbsp;or&nbsp;<a href="<?php echo zen_href_link(FILENAME_LOGOFF)?>"><?php echo HEADER_TITLE_LOGOFF?></a>
			<?php }else{?>
				<a href="<?php echo zen_href_link(FILENAME_LOGIN)?>"><?php echo HEADER_TITLE_LOGIN?></a>&nbsp;or&nbsp;
				<a href="<?php echo zen_href_link(FILENAME_CREATE_ACCOUNT)?>"><?php echo HEADER_TITLE_CREATE_ACCOUNT?></a>
			<?php }?>
			</div>
			<div id="header-currencies-wrapper">
				<span id="header-currencies"><a href="#"><?php echo HEADER_TITLE_CURRENCIES?><span style="text-decoration: underline;color:#fff;"><?php echo $_SESSION['currency']?></span></a></span>
				<div id="header-currencies-children">
					<ul>
					<?php 
					  reset($currencies->currencies);
				      while (list($key, $value) = each($currencies->currencies)) {
				        echo '<li><a href="'.zen_href_link(basename(preg_replace('/.php/','', $PHP_SELF)),'currency='.$key).'">'.$value['title'].'</a></li>';
				      }
					?>
					</ul>
				</div>				
			</div>
			<div id="header-help-wrapper">
				<span id="header-help"><a href="<?php echo zen_href_link(FILENAME_ACCOUNT)?>"><?php echo HEADER_TITLE_HLEP?></a></span>
				<div id="header-help-children">
					<ul>
						<li><a href="<?php echo zen_href_link(FILENAME_FAQ)?>"><?php echo HEADER_TITLE_SUBMIT_A_REQUEST?></a></li>
						<li><a href="<?php echo zen_href_link(FILENAME_FAQS_ALL)?>"><?php echo HEADER_TITLE_KNOWLEDGEBASE?></a></li>
					</ul>
				</div>				
			</div>
			<?php 
			if ($_SESSION['customer_id']!=''){
			?>
			<div id="header-account-wrapper">
				<span id="header-account"><a href="<?php echo zen_href_link(FILENAME_ACCOUNT)?>"><?php echo HEADER_TITLE_MY_ACCOUNT?></a></span>
				<div id="header-account-children">
					<ul>
						<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT)?>"><?php echo HEADER_TITLE_VIEW_ORDER?></a></li>
						<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT_EDIT)?>"><?php echo HEADER_TITLE_ACCOUNT_EDIT?></a></li>
						<li><a href="<?php echo zen_href_link(FILENAME_ADDRESS_BOOK)?>"><?php echo HEADER_TITLE_ADDRESS_BOOK?></a></li>
						<li><a href="<?php echo zen_href_link(FILENAME_LOGOFF)?>"><?php echo HEADER_TITLE_LOGOFF?></a></li>
					</ul>
				</div>
			</div>
			<?php 
			}
			?>				
		</div>
	</div>
	<div id="headerWrapper-middle">
		<div id="header-log-wrapper"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES.'logo.gif'?>" alt="logo" title="the logo of the site" /><br />
		High Quality Hermes Replicas For Sale
		</div>
		<div style="float:left;font-weight:bold;font-size:15px;padding:10px 0 0 10px"><br />Worldwide<br />Free Shipping</div>
		<div style="float:left">
			<div id="header-ad-wrapper">
				<div id="ad-enjoy"></div>
				<a href="<?php echo zen_href_link(FILENAME_DEFAULT)?>">
					Top Grade<div>Guarantee</div>
				</a>
				<a href="<?php echo zen_href_link(FILENAME_DEFAULT)?>">
					30-DAYS<div>Returns</div>
				</a>
				<a href="<?php echo zen_href_link(FILENAME_DEFAULT)?>">
					100%-Price<div>Guarantee</div>
				</a>
				<a href="<?php echo zen_href_link(FILENAME_DEFAULT)?>">
					100%<div>Secure Site</div>
				</a>												
			</div>
			<div class="ClearBoth"></div>
			<div>
				<div id="header-search"><?php require DIR_WS_MODULES.zen_get_module_directory('search_header.php');?></div>
				<div id="header-cart"><div>
				<?php if ($_SESSION['customer_id']!=''){?>
				<a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART)?>" style="color:#000;">
				<?php echo $_SESSION['cart']->count_contents() ?>&nbsp;Items IN Your Cart
				</a>
				<?php }else{?>
				<span style="color:#ccc;">
				<?php echo $_SESSION['cart']->count_contents() ?>&nbsp;Items IN Your Cart
				</span>
				<?php }?>
				</div></div>
				<div class="ClearBoth"></div>
			</div>
		</div>
	</div>
	<div class="ClearBoth"></div>
	<div id="headerWrapper-bottom">
		<div id="nav-left-decoration"></div>
<?php 
require  $template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php';
?>
		<div id="nav-right-decoration"></div>
	</div>
</div>
<div class="ClearBoth"></div>
<?php } ?>